import request from 'utils/request'

interface GetSecurityListOption {
  routeName: string
  dzcode: string
  pageSize: number
  timestamp: string
  pageIndex: number
  stationName: string
  searchKey: string
  orgName: string
}

// 人员列表
export function getSecurityList({ routeName, dzcode, pageSize, timestamp, pageIndex, stationName, searchKey, orgName }: GetSecurityListOption) {
  return request({
    url: '/person/situation/getSecurityList',
    method: 'GET',
    params: {
      routeName,
      dzcode,
      pageSize,
      timestamp,
      pageIndex,
      stationName,
      searchKey,
      orgName
    }
  })
}
interface GetSecurityTopOption {
  dzcode: string
  type: number
}
// 安保人员排行
export function getSecurityTop({ dzcode, type }: GetSecurityTopOption) {
  return request({
    url: '/person/situation/getSecurityTop',
    method: 'GET',
    params: {
      dzcode,
      type
    }
  })
}

interface GetSecurityTotalPerOption {
  dzcode: string
}
// 安保人员分类统计
export function getSecurityTotalPer({ dzcode }: GetSecurityTotalPerOption) {
  return request({
    url: '/person/situation/getSecurityTotalPer',
    method: 'GET',
    params: {
      dzcode
    }
  })
}
